using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
using Domain.Model.Entity;


namespace Domain.Model.Map
{
    public class OZUserDetailMap : ClassMapping<OZUserDetail>
    {

        public OZUserDetailMap()
        {
            Table("OZ_User_Detail");
            Schema("dbo");
            Lazy(true);
            Id(x => x.DetailID, map => { map.Column("Detail_ID"); map.Generator(Generators.Assigned); });
            Property(x => x.DetailAge, map => map.Column("Detail_Age"));
            ManyToOne(x => x.OZUser, map =>
            {
                map.Column("User_ID");
                map.NotNullable(true);
                map.Cascade(Cascade.None);
            });

        }
    }
}
